from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

driver=webdriver.Edge()
driver.maximize_window()
driver.get('https://m.anjuke.com/bj/')
sleep(5)

#点击登录
driver.find_element(By.LINK_TEXT, '登录/注册').click()
sleep(2)

#点击登录注册
driver.find_element(By.PARTIAL_LINK_TEXT,'登录/注册').click()
sleep(2)

#点击账号登录
driver.find_element(By.XPATH,'//*[@id="container"]/article/section[1]/div/div[8]/span[1]').click()
sleep(2)

#输入账号
driver.find_element(By.ID,'input-username').send_keys('17733058407')
sleep(2)

#输入密码
driver.find_element(By.XPATH,'//*[@id="input-password"]').send_keys('li10140910')
sleep(2)

#勾选协议
driver.find_element(By.XPATH,'//*[@id="checkagree"]').click()
sleep(2)

#点击登录
driver.find_element(By.XPATH,'//*[@id="btn-login"]').click()
sleep(2)